package cn.lili.controller;

import cn.lili.common.vo.ResponseBean;
import cn.lili.modules.dto.CommentVideoDTO;
import cn.lili.modules.dto.ShareDTO;
import cn.lili.modules.service.AppGiveService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;

/**
 * @author:xiangqian
 * @date: 2024/3/11 19:45
 */
@RestController
@AllArgsConstructor
@Api(tags = "点赞管理")
@RequestMapping("/videos")
public class AppGiveController {

    private AppGiveService appGiveService;

    @ApiModelProperty(value = "评论小视频")
    @PostMapping("/Myvideo/CommentVideo")
    public ResponseBean commentVideo(@RequestBody CommentVideoDTO commentVideoDTO) {
        return appGiveService.commentVideo(commentVideoDTO);
    }

    @ApiModelProperty(value = "点赞小视频")
    @GetMapping("/Myvideo/GiveVideo")
    public ResponseBean giveVideo(String id, String token) {
        return appGiveService.giveVideo(id, token);
    }

    @ApiModelProperty(value = "转发/分享小视频")
    @PostMapping("/Myvideo/share")
    public ResponseBean share(@RequestBody ShareDTO shareDTO) {
        return appGiveService.share(shareDTO);
    }

    @ApiModelProperty(value = "关注或取消关注")
    @GetMapping("/Myvideo/FollowVideoV2")
    public ResponseBean followVideoV2(String id, Integer type, String token) {
        return appGiveService.followVideoV2(id, type, token);
    }
}
